package com.ujson.base.persistence;

import java.io.Serializable;
import java.util.List;

public interface AbstractDao<T, ID extends Serializable> {

    /** add **/
    T save(T obj);

    /** delete **/
    void delete(T obj);

    int deleteById(ID id);


    /** update **/
    T update(T obj);


    /** find **/
    long count();

    long count(T obj);

    T findById(ID id);

    List<T> find(T example);

}
